package com.putable.cgw.game.member;

import java.awt.Point;

import com.putable.cgw.game.yard.Yard;

/**
 * Abstract representation of a <code>Yard</code>.  
 */
public abstract class AbstractMember implements Member {

	private Member upChain;//Member behind
	private Member downChain;//Member in front
	private Point position = new Point(-1,-1);//Position in yard
	private Yard yard; //Which yard they're in.
	
	public AbstractMember(){}
	public AbstractMember(int x, int y){
		position.x = x;
		position.y = y;
	}
	public AbstractMember(Point location){
		this(location.x, location.y);
	}
	
	public Member getUpChain() {
		return upChain;
	}
	public void setUpChain(Member upChain) {
		this.upChain = upChain;
	}
	
	
	public Member getDownChain() {
		return downChain;
	}
	@Override
	public void setDownChain(Member downChain) {
		this.downChain = downChain;
	}
	@Override
	public Point getPosition() {
		return position;
	}
	@Override
	public void setPosition(Point position) {
		setPosition(position.x, position.y);
	}
	
	public void setPosition(int x, int y) {
		position.x = x;
		position.y = y;
	}
	
	public void setYard(Yard yard) {
		this.yard = yard;
	}
	
	public Yard getYard() {
		return yard;
	}
}
